

from selenium.webdriver.common.by import By
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.select import Select
from selenium.webdriver import Keys,ActionChains
import time
driver=webdriver.Edge()
driver.get('http://10.59.9.12:7001/')
# 隐士等待
driver.implicitly_wait(10)
# 显示等待
WebDriverWait(driver,20,0.5).until(EC.presence_of_element_located((By.XPATH)))
# 强制等待
time.sleep(3)
# 切换页面
driver.switch_to.window(driver.window_handles[-1])
# 进入fram框架
driver.switch_to.frame(driver.find_element(By.ID,''))
# 退出框架
driver.switch_to.default_content()
# 滚动
driver.execute_script('window.scrollTo(0,100)')
# 刷新浏览器
driver.refresh()
# 键盘事件
a1=driver.find_element(By.ID,'23')
a1.send_keys(Keys.ENTER)
a1.send_keys(Keys.CONTROL,'c')
# 鼠标事件
ActionChains(driver).double_click(a1).click().perform()
# 下拉
xiala=Select(driver.find_element(By.ID,''))
xiala.select_by_value('')


























